<?php
/**
 * GeoContexter
 * @link http://code.google.com/p/geocontexter/
 * @package GeoContexter
 */

/**
 * Admin logout controller
 *
 * @package GeoContexter
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @author Armand Turpel <geocontexter@gmail.com>
 * @version $Rev: 828 $ / $LastChangedDate: 2011-02-27 10:30:28 +0100 (So, 27 Feb 2011) $ / $LastChangedBy: armand.turpel $
 */

namespace Geocontexter\Controller;

use Core\Controller\AbstractController;

class LogoutController extends AbstractController
{
    /**
     */
    public function indexAction()
    {
        $this->AuthService = $this->getServiceLocator()->get('CoreAuth');

        $this->AuthService->clearIdentity();

        return $this->redirect()->toRoute('admin', array('controller' => 'login',
                                                         'secret'     => $this->config['adminAreaToken']));
    }
}

